package com.githan.bootsecurity.controller;

import com.alibaba.fastjson.JSON;
import com.githan.bootsecurity.entity.SysUser;
import com.githan.bootsecurity.service.SysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author https://github.com/Han56
 * @date 2021/4/10 11:00
 */
@RestController
public class SysUserController {
    @Autowired
    SysUserService sysUserService;

    @GetMapping("/SysUser")
    public String SysUser(){
        List<SysUser> testList=sysUserService.getAllUserInfo();
        String testJson= JSON.toJSONString(testList);
        System.out.println(testJson);
        return testJson;
    }
}
